package org.tis.tools.abf.module.om.entity.vo;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.tis.tools.abf.module.om.entity.OmEmployee;
import org.tis.tools.abf.module.om.entity.enums.OmEmployeeStatus;
import org.tis.tools.abf.module.om.entity.enums.OmGender;
import org.tis.tools.abf.module.om.entity.enums.OmPaperType;
import org.tis.tools.abf.module.om.entity.enums.OmZipCode;
import org.tis.tools.model.enums.CommonEnumDeserializer;

import java.util.Date;

/**
 * Created by chenchao
 * Created on 2018/8/28 17:22
 */
@Data
public class OmEmployeeOperatorDetail {

    private String guid;

    private String empCode;

    private String empName;

    private String empRealname;

    @JSONField(deserializeUsing = CommonEnumDeserializer.class)
    private OmGender gender;

    @JSONField(deserializeUsing = CommonEnumDeserializer.class)
    private OmEmployeeStatus empstatus;

    private String guidOrg;

    private String guidPosition;

    private String guidEmpMajor;

    private Date indate;

    private Date outdate;

    private String mobileno;

    @JSONField(deserializeUsing = CommonEnumDeserializer.class)
    private OmPaperType paperType;

    private String paperNo;

    private Date birthdate;

    private String htel;

    private String haddress;

    @JSONField(deserializeUsing = CommonEnumDeserializer.class)
    private OmZipCode hzipcode;

    private String guidOperator;

    private String userId;

    private String remark;

    private Date createtime;

    private Date lastupdate;

    private String updator;

    private String dataStatus;

    private String operatorName;

    private String positionName;

    public OmEmployeeOperatorDetail(){}

    public OmEmployeeOperatorDetail(OmEmployee omEmployee, String operatorName,String positionName){
        this.guid = omEmployee.getGuid() ;
        this.empCode = omEmployee.getEmpCode() ;
        this.empName = omEmployee.getEmpName() ;
        this.empRealname = omEmployee.getEmpRealname() ;
        this.gender = omEmployee.getGender() ;
        this.empstatus = omEmployee.getEmpstatus() ;
        this.guidOrg = omEmployee.getGuidOrg() ;
        this.guidPosition = omEmployee.getGuidPosition() ;
        this.guidEmpMajor = omEmployee.getGuidEmpMajor() ;
        this.indate = omEmployee.getIndate() ;
        this.outdate = omEmployee.getOutdate() ;
        this.mobileno = omEmployee.getMobileno() ;
        this.paperType = omEmployee.getPaperType() ;
        this.paperNo = omEmployee.getPaperNo() ;
        this.birthdate = omEmployee.getBirthdate() ;
        this.htel = omEmployee.getHtel() ;
        this.haddress = omEmployee.getHaddress() ;
        this.hzipcode = omEmployee.getHzipcode() ;
        this.guidOperator = omEmployee.getGuidOperator() ;
        this.userId = omEmployee.getUserId() ;
        this.remark = omEmployee.getRemark() ;
        this.createtime = omEmployee.getCreatetime() ;
        this.lastupdate = omEmployee.getLastupdate() ;
        this.updator = omEmployee.getUpdator() ;
        this.dataStatus = omEmployee.getDataStatus() ;
        this.operatorName = operatorName ;
        this.positionName = positionName ;
    }

    public OmEmployeeOperatorDetail(OmEmployee omEmployee, String operatorName){
        this.guid = omEmployee.getGuid() ;
        this.empCode = omEmployee.getEmpCode() ;
        this.empName = omEmployee.getEmpName() ;
        this.empRealname = omEmployee.getEmpRealname() ;
        this.gender = omEmployee.getGender() ;
        this.empstatus = omEmployee.getEmpstatus() ;
        this.guidOrg = omEmployee.getGuidOrg() ;
        this.guidPosition = omEmployee.getGuidPosition() ;
        this.guidEmpMajor = omEmployee.getGuidEmpMajor() ;
        this.indate = omEmployee.getIndate() ;
        this.outdate = omEmployee.getOutdate() ;
        this.mobileno = omEmployee.getMobileno() ;
        this.paperType = omEmployee.getPaperType() ;
        this.paperNo = omEmployee.getPaperNo() ;
        this.birthdate = omEmployee.getBirthdate() ;
        this.htel = omEmployee.getHtel() ;
        this.haddress = omEmployee.getHaddress() ;
        this.hzipcode = omEmployee.getHzipcode() ;
        this.guidOperator = omEmployee.getGuidOperator() ;
        this.userId = omEmployee.getUserId() ;
        this.remark = omEmployee.getRemark() ;
        this.createtime = omEmployee.getCreatetime() ;
        this.lastupdate = omEmployee.getLastupdate() ;
        this.updator = omEmployee.getUpdator() ;
        this.dataStatus = omEmployee.getDataStatus() ;
        this.operatorName = operatorName ;
    }

}
